package com.spirng_jpa.jpa_demo.controller;

import com.spirng_jpa.jpa_demo.mapper.JpaDemo;
import com.spirng_jpa.jpa_demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Date:2022/03/11 16:54
 * @Author: weijunwei
 */
@RestController
public class JpaDemoController {

    @Autowired
    private JpaDemo jpaDemo;
    @RequestMapping("jpa")
    public List<User> show(){
        List<User> users = jpaDemo.findAll();
        System.out.println("你好");
        System.out.println("你好");
        return users;
    }
}
